import type { StyleValue } from "vue";
import type { LowCodeConf, LowcodeMenuItemCFG, LowcodePagePanel, LowcodePagePanelComponentItem, LowcodeRect, LowCodeWhereListItem } from "../interface";
import type { LowcodeSaveTableConfig, LowcodeTableSaveData } from "../hooks/interface";

export interface FetchMaintainDataProxy {
	isOnLoad ?: boolean;
}

export interface MaintainState {
	mdCode ?: string;
	detailMdCode ?: string;
	ListData ?: any[];
	// cardTitleField?: string;
	listColumns ?: LowcodePagePanelComponentItem[][];
	ComponentsHeader ?: LowcodePagePanelComponentItem[][];
	systemInfo ?: any;
	// 
	menusCFG ?: LowcodeMenuItemCFG[];
	menusCFGBottom ?: LowcodeMenuItemCFG[];

	navWrapRect ?: LowcodeRect;
	searchCardData ?: { [key : string] : any };
	fuzzyVal ?: string;
	whereList ?: LowCodeWhereListItem[];

	//
	cellProps ?: { [key : string] : any };
	subCellProps ?: { [key : string] : any };
	// 
	tableSaveData : LowcodeTableSaveData & LowcodeSaveTableConfig;
	// 容器
	Panel : LowcodePagePanel;
	Panels : LowcodePagePanel[];

	showComponents ?: LowcodePagePanelComponentItem[];
	showComponentsEdit ?: LowcodePagePanelComponentItem[];

	createPopupStyle ?: StyleValue;
	// 

	editTbIdx ?: number;
	editTbRowData ?: { [key : string] : any };
	// 新增修改数据 
	popupData ?: { [key : string] : any };
	validateErrorDataPop ?: { [key : string] : any };

	initOtherPanelDataObj ?: { [key : string] : any };
	// 字段数据
	componentConf ?: { [key : string] : LowcodePagePanelComponentItem };
}

export interface FetchMaintainParam {
	BillMode ?: number;
	PageSize ?: number;
	CurrentPage ?: number;
	IsNotPage ?: boolean;
	AggregateList ?: object[];
	WhereList ?: LowCodeWhereListItem[];
}

export interface FetchMaintainResult {
	AggregateObject ?: object[];
	CurrentPage ?: number;
	ErrorString ?: string;
	PageCount ?: number;
	PageSize ?: number
	ReturnObject ?: any[];
	RowsCount ?: number;
}